<?php
require_once ('odal/meta/scheme.php');
require_once ('odal/meta/datatype.php');
require_once ('odal/node.php');


/**
 * @version 1.0
 * @created 27-Dez-2003 21:35:23
 */
class odal_Namespace extends odal_Node{	

	var $m_datatypes = Array();
	var $m_path;
	var $m_schemes = Array();
	
	function odal_Namespace($id, $name, $path, $creatingDate = null, $creater = 0, $modifyingDate = null, $modifier = 0){
		$this->_createNamespace($id, $name, $path, $creatingDate = null, $creater = 0, $modifyingDate = null, $modifier = 0);
	}//odal_Namespace

	function _createNamespace($id, $name, $path, $creatingDate, $creater, $modifyingDate, $modifier){
		$this->m_id = $id;
		$this->m_name = $name;
		$this->m_path = $path;
		$this->m_creatingDate = $creatingDate;
		$this->m_creater = $creater;
		$this->m_modifyingDate = $modifyingDate;
		$this->m_modifier = $modifier;
	}//_createNamespace

	function appendDatatype( &$datatype ){
		$this->m_datatypes[$datatype->getId()] =& $datatype;
	}//appendScheme

	function appendScheme( $schemeId, &$scheme ){
		$this->m_schemes[$schemeId][$scheme->getId()] =& $scheme;
	}//appendScheme

	function &getDatatypeById( $id ){
		return $this->getObjectFromCollectionById( $id, $this->m_datatypes );
	}//getDatatypeById

	function &getDatatypeByName( $name ){
		return $this->getObjectFromCollectionByName( $name, $this->m_datatypes );
	}//getDatatypeByName	
	
	function &getDatatypes(){
		return $this->m_datatypes;
	}//getDatatypes

	function getPath(){
		return $this->m_path;
	}//getPath

	function &getSchemeById( $id ){
		return $this->getObjectFromCollectionById( $id, $this->m_schemes );
	}//getSchemeById

	function &getSchemeByName( $name ){
		return $this->getObjectFromCollectionByName( $name, $this->m_schemes );
	}//getSchemeByName	

	function &getSchemes(){
		return $this->m_schemes;
	}//getSchemes
	
	function __sleep(){
		return Array( "m_id", "m_name", "m_path", "m_creatingDate", "m_creater", "m_modifyingDate", "m_modifier", "m_datatypes" );
	}//__sleep

function __TODO__(){}

	function createScheme()
	{
	}

}//odal_Namespace
?>